import type { GetPatientOrderLogisticsData } from '@/types/order'
import { request } from '@/utils/request'

/**
 * 取消订单
 * @param id 订单ID
 * @returns
 */
export const putPatientOrderCancelByIdAPI = (id: string) => {
  return request(`/patient/order/cancel/${id}`, 'PUT')
}

/**
 * 提醒发货
 * @param id 订单ID
 * @returns
 */
export const getOrderRemindSendGoodsByIdAPI = (id: string) => {
  return request(`/order/remind/sendGoods/${id}`, 'GET')
}

/**
 * 删除订单
 * @param id 订单ID
 * @returns
 */
export const deletePatientOrderByIdAPI = (id: string) => {
  return request(`/patient/order/${id}`, 'DELETE')
}

/**
 * 确认收货
 * @param id 订单ID
 * @returns
 */
export const putPatientOrderConfirmByIdAPI = (id: string) => {
  return request(`/patient/order/confirm/${id}`, 'PUT')
}

/**
 * 模拟发货信息-生成物流信息
 * @param id 订单ID
 * @returns
 */
export const getPatientMockConsignmentByIdAPI = (id: string) => {
  return request(`/patient/mockConsignment/${id}`, 'GET')
}

/**
 * 查询物流信息
 * @param id 订单ID
 * @returns
 */
export const getPatientOrderLogisticsByIdAPI = (id: string) => {
  return request<GetPatientOrderLogisticsData>(`/patient/order/${id}/logistics`, 'GET')
}